import os
import shutil


def giveArgsToMain(text, num):
    order = "python main1.py --cfg config/coco_eval.yml --text \"" + str(text) + "\"" + \
            " --num " + str(num)
    os.system(order)


def execute_text(text):
    print("execute\n\n\n\n\n\n\n")
    # text = text.replace("，", ",")
    # text = text.replace("。", ".")
    # text = text.replace("！", "!")
    # text = text.replace("？", "?")
    # text = text.replace("”", "\"")
    # text = text.replace("“", "\"")
    # text = text.replace("：", ":")
    # text = text.replace("、", ",")
    # text = text.replace("；", ";")
    # text = text.replace("《", " ")
    # text = text.replace("》", " ")
    # import unicodedata
    
    # t2 = unicodedata.normalize('NFKC', text)   
    num = 2
    giveArgsToMain(text, num)


# text = '一个男人在吃披萨. Someone in a gorilla costume is playing a set of drums. A cheetah chases prey on across a field.'
# execute_text(text)



